/* login-window.c
 *
 * Copyright 2024 wan-iot
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "main-window.h"

struct _MainWindow
{
  GtkApplicationWindow  parent_instance;

  /* Template widgets */
  //GtkHeaderBar        *header_bar;
 // GtkButton *btn_login;
  //GtkButton *btn_cancel;
  
  //struct MainWindow *mainWindow;
  //GtkApplicationWindow *main_window;
  //GtkButton *btn_query;
};



G_DEFINE_TYPE (MainWindow, main_window, GTK_TYPE_APPLICATION_WINDOW)

static void
main_window_class_init (MainWindowClass *klass)
{
  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);

  gtk_widget_class_set_template_from_resource (widget_class, "/a/b/e/main/main-window.ui");
  //gtk_widget_class_bind_template_child (widget_class, LoginWindow, header_bar);
  //gtk_widget_class_bind_template_child (widget_class, LoginWindow, btn_login);
  //gtk_widget_class_bind_template_child (widget_class, LoginWindow, btn_cancel);
  //注册主窗体
  //gtk_widget_class_bind_template_child (widget_class, LoginWindow, main_window);
  //gtk_widget_class_bind_template_child (widget_class,   LoginWindow, btn_query);
 
}

              
static void
main_window_init (MainWindow *self)
{
  gtk_widget_init_template (GTK_WIDGET (self));
 
          
  //g_signal_connect (self->btn_login, "clicked", G_CALLBACK (login), NULL);
  //g_signal_connect (self->btn_cancel,"clicked",G_CALLBACK (cancel),NULL);
              //第二个窗体
  //g_signal_connect (main_window, "destroy", G_CALLBACK (close_main_window), NULL);
  //g_signal_connect (self->btn_query, "clicked", G_CALLBACK (btn_query), NULL);
              
  //g_signal_connect (window, "destroy", G_CALLBACK (on_activate), NULL);
}
